/**
 * Created by Administrator on 2016/12/23 0023.
 */

const express=require("express");
const app=express();
const router=require("./router/router.js");

//var Book=require("./models/Book.js");

app.set("view engine","ejs");
app.use(express.static("./public"));

app.get("/",router.showIndex);
app.get("/addbook",router.addbook);
app.get("/doaddbook",router.doaddbook);
app.get("/edit",router.edit)
app.listen(3000,"127.0.0.1");


//Student.create({"name":"xsd","age":23,"sex":"女"})

/*Student.findByName("xsd", function (err,result) {
    console.log(result);
});*/
/*Student.updateByName({"name":"xsd"},{$set:{"age":30}},{}, function (err, result) {
    //console.log(result);
})*/
/*
var s1=new Student({"name":"小红","age":13,"sex":"女"});
s1.save(function () {
    console.log("success");
})*/
